﻿/*------------------------------------------------
// File Description: DistributeCodeOperate DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-03-17 16:13:14
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 条码操作记录
    /// </summary>
    [Table(nameof(DistributeCodeOperate))]
    public class DistributeCodeOperate : BaseEntity
    {
        private string _code = string.Empty;

        #region Public Property

        ///<Summary>
        /// 任务ID
        ///</Summary>
        public int TaskId { get; set; }

        ///<Summary>
        /// 条码ID
        ///</Summary>
        public int CodeId { get; set; }

        ///<Summary>
        /// 条码
        ///</Summary>
        public string Code
        {
            get { return string.IsNullOrWhiteSpace(_code) ? string.Empty : _code; }
            set { _code = value; }
        }

        ///<Summary>
        /// 操作类型
        ///</Summary>
        public Enum.DistributeCodeOperateType OperateType { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 条码操作记录
        /// </summary>
        public virtual DbSet<DistributeCodeOperate> DistributeCodeOperates { get; set; }
    }
}